<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        body {
            width: 3000px;
            height: 3000px;
        }
    </style>
</head>

<body>

    <script>

        // console.log(document.body.clientHeight);

        // 浏览器的可视高度  clientHeight / clientWidth
        console.log(document.documentElement.clientHeight);

        // 页面的实际宽高  scrollHeight / scrollWidth
        console.log(document.documentElement.scrollHeight);


        // 页面被卷去的宽高  scrollLeft / scrollTop
        console.log(document.documentElement.scrollTop);


    </script>

</body>

</html>